package com.zyz.B_流程控制.键盘录入;

//引入 包
import java.util.Scanner;

/**
 * @author: vick
 * @Date: 2025/3/11
 * @Description:
 * @version: 1.0
 */
public class Demo {
    public static void main(String[] args) {
        //创建 Scanner 对象
        Scanner scanner = new Scanner(System.in);
        System.out.println("======欢迎来到系统登录页面=====");
        System.out.println("请输入你的用户名");
        String username = scanner.nextLine();
        System.out.println("用户名：" + username);

        System.out.println("================");
        System.out.println("请输入单词：");
        String word = scanner.next();
        System.out.println("输入的单词为：" + word);

        System.out.println("================");
        System.out.println("请输入年龄：");
        int age = scanner.nextInt();
        System.out.println("年龄：" + age);

        System.out.println("================");
        System.out.println("请输入成绩：");
        double score = scanner.nextDouble();
        System.out.println("成绩为：" + score);

        System.out.println("================");
        System.out.println("是否单身：");
        boolean flag = scanner.nextBoolean();
        System.out.println("是否单身：" + flag);

        //关闭
        scanner.close();
    }
}
